package com.uchengwang.ui.utils;

/**
 * Created by U城网 on 2017/4/21.
 */

public class GetInfoUtils {
    private static GetInfoUtils utils;

    private GetInfoUtils(){}

    public static GetInfoUtils getUtils() {
        if (utils == null){
            utils = new GetInfoUtils();
        }
        return utils;
    }

    /**
     * 发布U学 U用等信息根据名称 得到对用Type
     * */
    public int getTypeByName(String name){
        int type = 0;

        switch (name){
            case "专业课程"://U学
                type = 100;
                break;
            case "考研课程":
                type = 110;
                break;
            case "培训课程":
                type = 120;
                break;
            case "公开讲座":
                type = 130;
                break;
            case "U学其他":
                type = 199;
                break;

            case "考研书":
                type = 201;
                break;
            case "考试书":
                type = 202;
                break;
            case "休闲书":
                type = 203;
                break;
            case "专业书籍":
                type = 204;
                break;
            case "书籍其他":
                type = 209;
                break;

//            case "自行车"://U用--交通工具
//                type = 210;
//                break;
//            case "电动车":
//                type = 211;
//                break;
//            case "摩托车":
//                type = 212;
//                break;
//            case "交通工具其他":
//                type = 219;
//                break;
            case "交通工具":
                type = 210;
                break;
//            case "笔记本电脑"://U用--数码电子
//                type = 220;
//                break;
//            case "平板电脑":
//                type = 221;
//                break;
//            case "手机":
//                type = 222;
//                break;
//            case "相机":
//                type = 223;
//                break;
//            case "数码电子其他":
//                type = 229;
//                break;
            case "数码电子":
                type = 220;
                break;
//            case "体育用品"://U用--生活用品
//                type = 230;
//                break;
//            case "服饰鞋子":
//                type = 231;
//                break;
//            case "洗护用品":
//                type = 232;
//                break;
//            case "小饰品":
//                type = 233;
//                break;
//            case "生活用品其他":
//                type = 239;
//                break;
            case "生活用品":
                type = 230;
                break;
//            case "合租"://U用--房屋转租
//                type = 240;
//                break;
//            case "整租":
//                type = 241;
//                break;
//            case "房屋转租其他":
//                type = 249;
//                break;
            case "房屋转租":
                type = 240;
                break;
//            case "校园代办"://U用--时间技能
//                type = 250;
//                break;
//            case "技能出租":
//                type = 251;
//                break;
//            case "时间技能其他":
//                type = 259;
//                break;
            case "时间技能":
                type = 250;
                break;

            case "U用其他":
                type = 299;
                break;
            case "户外活动"://U行
                type = 300;
                break;
            case "景点旅游":
                type = 310;
                break;
            case "结伴同行":
                type = 320;
                break;
            case "U行其他":
                type = 399;
                break;
            case "体育运动"://U赛
                type = 400;
                break;
            case "知识拓展":
                type = 410;
                break;
            case "娱乐游戏":
                type = 420;
                break;
            case "U赛其他":
                type = 499;
                break;
        }
        return type;
    }

    /**
     * 得到社团类型
     * */
    public int getClubType(String clubType){
        int type = 0;
        switch (clubType){
            case "体育运动":
                type = 100;
                break;
            case "兴趣爱好":
                type = 200;
                break;
            case "学术科技":
                type = 300;
                break;
            case "实践公益":
                type = 400;
                break;
            case "文化艺术":
                type = 500;
                break;
            case "职能类":
                type = 600;
                break;
            case "其他":
                type = 999;
                break;
        }
        return type;
    }

    /**
     * 获取热文类型
     * */
    public int getHotArticle(String name){
        int type = 0;
        switch (name){
            case "情感":
                type = 1;
                break;
            case "励志":
                type = 2;
                break;
            case "社评":
                type = 3;
                break;
            case "感悟":
                type = 4;
                break;
            case "话题":
                type = 5;
                break;
        }
        return type;
    }

}
